<template>
	<u-tabbar :value="value" @change="handleChange" :zIndex="1000" :fixed="true" :placeholder="false" :safeAreaInsetBottom="true"
		activeColor="#F08519" inactiveColor="#333333">
		<u-tabbar-item text="首页" name="1">
			<image class="width_24 height_24" slot="active-icon" :src="ossUrl+'/menu_1_a.png'"></image>
			<image class="width_24 height_24" slot="inactive-icon" :src="ossUrl+'/menu_1.png'"></image>
		</u-tabbar-item>
		<u-tabbar-item text="分类" name="2">
			<image class="width_24 height_24" slot="active-icon" :src="ossUrl+'/menu_2_a.png'"></image>
			<image class="width_24 height_24" slot="inactive-icon" :src="ossUrl+'/menu_2.png'"></image>
		</u-tabbar-item>
		<u-tabbar-item text="合伙人" name="3">
			<image class="width_24 height_24" slot="active-icon" :src="ossUrl+'/menu_3_a.png'"></image>
			<image class="width_24 height_24" slot="inactive-icon" :src="ossUrl+'/menu_3.png'"></image>
		</u-tabbar-item>
		<u-tabbar-item text="购物车" name="4">
			<image class="width_24 height_24" slot="active-icon" src="@/static/images/menu_4_a.png"></image>
			<image class="width_24 height_24" slot="inactive-icon" src="@/static/images/menu_4.png"></image>
		</u-tabbar-item>
		<u-tabbar-item text="我的" name="5">
			<image class="width_24 height_24" slot="active-icon" src="@/static/images/menu_5_a.png"></image>
			<image class="width_24 height_24" slot="inactive-icon" src="@/static/images/menu_5.png"></image>
		</u-tabbar-item>
	</u-tabbar>
</template>

<script>
	const tabbarObj = {
		'1': "/pages/index/index",
		'2': "/pages/index/categery",
		'3': "/pages/index/partner",
		'4': "/pages/index/shopping_cart",
		'5': "/pages/index/user",
		'1': "/pages/index/index",
	}
	export default {
		props: {
			value: {
				type: String,
				default: '1'
			}
		},
		data() {
			return {
				ossUrl: this.$ossUrl
			}
		},
		methods: {
			handleChange(name) {
				uni.reLaunch({
					url: tabbarObj[name]
				})
			}
		},
	}
</script>

<style lang="scss">
	.container {}
</style>